package com.study.spaoplog.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;

/**
 * @author MI
 * @version 1.0
 * @date 2021/6/8 23:36
 */
@Getter
@Setter
@NoArgsConstructor
@ApiModel(value = "SysLog-bean", description = "用来做测试的 测试bean")
public class SysLog implements Serializable {
    /**
     * 用戶ID
     */
    @ApiModelProperty(value = "用户ID")
    private String uid;

    public SysLog(String uid) {
        this.uid = uid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        SysLog sysLog = (SysLog) o;
        return new EqualsBuilder().append(uid, sysLog.uid).isEquals();
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder(17, 37).append(uid).toHashCode();
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.NO_CLASS_NAME_STYLE);
    }
}
